#ifndef KERNEL_SRP_H_
#define KERNEL_SRP_H_

/* ************************************************************************** */

#include <tT.h>
#include <types.h>

/* ************************************************************************** */

typedef struct tt_message_t tt_message_t;

/* ************************************************************************** */

void tt_expired(env_time_t);

/* ************************************************************************** */

#ifndef TT_NUM_MESSAGES
	/**
	 * \brief The number of messages that the kernel facillitates.
	 */
#	define TT_NUM_MESSAGES	10
#endif

/* ************************************************************************** */

#ifndef TT_ARGS_SIZE
	/**
	 * \brief The size of the variable argument buffer.
	 */
#	define TT_ARGS_SIZE		8
#endif

/* ************************************************************************** */

#ifdef TT_KERNEL_SANITY
	/** \cond */
#	define _STR(str) #str
#	define STR(str) _STR(str)
	/** \endcond */
	
	/**
	 * \brief The kernel sanity macro.
	 *
	 * Should only be used for debugging purposes. Used whenever
	 * TT_KERNEL_SANITY is defined. Will fail whenever the expression
	 * supplied is not evaluated as true.
	 */
#	define TT_SANITY(expr) \
		if (!(expr))\
			ENV_PANIC(\
					__FILE__ ":" STR(__LINE__) " ("\
					#expr ") failed sanity check.\n"\
					)
#else
#	define TT_SANITY(expr)
#endif

/* ************************************************************************** */

#endif
